using System;
using System.Globalization;

using Supremacy.Resources;

namespace SupremacyEditor.Services
{
    public class TextService : ITextService
    {
        private readonly IResourceManagerService _resourceManagerService;

        public TextService(IResourceManagerService resourceManagerService)
        {
            _resourceManagerService = resourceManagerService;
            if (resourceManagerService == null)
                throw new ArgumentNullException("resourceManagerService");

            this.Culture = CultureInfo.CurrentCulture;
        }

        public CultureInfo Culture { get; set; }
        protected static readonly CultureInfo NeutralCulture = CultureInfo.GetCultureInfo("en");

        public string GetClientString(string stringName)
        {
            return _resourceManagerService.GetString(stringName);
        }
    }
}